
//常量路由
export const constantRoutes =
  [
    {
      path: "/login",
      name: "login",
      component: () => import("@/views/login/login.vue"),
      meta: {
        title: "登录",
        hidden: true,
        icon: 'Position',
      },
    },
    {
      path: "/",
      name: "layout",
      component: () => import("@/views/layout/index.vue"),
      meta: {
        hidden: false,
      },
      redirect: "/home",
      children: [
        {
          path: "/home",
          name: "home",
          component: () => import("@/views/home/home.vue"),
          meta: {
            title: "首页",
            hidden: false,
            icon: 'HomeFilled',
          },
        },
      ],
    },
    {
      path: "/acl",
      name: "acl",
      component: () => import("@/views/layout/index.vue"),
      meta: {
        title: "权限管理",
        hidden: false,
        icon: 'EditPen',
      },
      redirect: "/acl/user",
      children: [
        {
          path: "/acl/user",
          name: "user",
          component: () => import("@/views/acl/user/index.vue"),
          meta: {
            title: "用户管理",
            hidden: false,
            icon: 'User',
          },
        },
        {
          path: "/acl/role",
          name: "role",
          component: () => import("@/views/acl/role/index.vue"),
          meta: {
            title: "角色管理",
            hidden: false,
            icon: 'Avatar',
          },
        }, {
          path: "/acl/permission",
          name: "permission",
          component: () => import("@/views/acl/permission/index.vue"),
          meta: {
            title: "菜单管理",
            hidden: false,
            icon: 'Grid',
          },
        },

      ]
    },
    {
      path: "/product",
      name: "product",
      component: () => import("@/views/layout/index.vue"),
      meta: {
        title: "商品管理",
        hidden: false,
        icon: 'EditPen',
      },
      redirect: "/product/trademark",
      children: [
        {
          path: "/product/trademark",
          name: "trademark",
          component: () => import("@/views/product/trademark/index.vue"),
          meta: {
            title: "品牌管理",
            hidden: false,
            icon: 'User',
          },
        },
        {
          path: "/product/attr",
          name: "attr",
          component: () => import("@/views/product/attr/index.vue"),
          meta: {
            title: "属性管理",
            hidden: false,
            icon: 'Avatar',
          },
        }, {
          path: "/product/sku",
          name: "sku",
          component: () => import("@/views/product/sku/index.vue"),
          meta: {
            title: "sku管理",
            hidden: false,
            icon: 'Grid',
          },
        }, {
          path: "/product/spu",
          name: "spu",
          component: () => import("@/views/product/spu/index.vue"),
          meta: {
            title: "spu管理",
            hidden: false,
            icon: 'Grid',
          },
        },

      ]
    },
    {
      path: "/screen",
      name: "screen",
      component: () => import("@/views/screen/index.vue"),
      meta: {
        title: "大屏",
        hidden: false,
        icon: 'Histogram',
      },
    },
    {
      path: "/404",
      name: "404",
      component: () => import("@/views/404/notFound.vue"),
      meta: {
        title: "找不到页面",
        hidden: true,
        icon: 'Warning',
      },
    },
    //任意路由重定向
    {
      path: "/:pathMatch(.*)*",
      redirect: "/404",
      name: "any",
      meta: {
        title: "跳转中",
        hidden: true,
        icon: 'Warning',
      },
    },
  ]
